package com.hust.bridgecheck.service.BridgeSensor;

import com.hust.bridgecheck.entity.*;

import java.util.List;

public interface SensorService {
    //添加传感器信息
    Sensor addSensor(Sensor sensor);

    //返回所有传感器信息
    List<Sensor> getAllSensor();

    //根据桥ID获取所有相关Sensor
    List<Sensor> getBridgeSenors(Integer bridgeID);

    //修改传感器信息
    Sensor updateSensor(Sensor sensor);

    //删除传感器信息
    void deleteSensor(Integer sensorID);

    //查询传感器信息
    Sensor getSensorByID(Integer sensorID);

    //通过paraid查看传感器数据
    List<SensorData> getSensorDataByParaId(String paraId, String startTime, String endTime);

    //通过paraid查看异常数据信息
    List<WarningData> getWarningDataByParaId(String paraId);

    //通过桥ID查看异常数据信息
    List<WarningData> getWarningDataByBridgeId(Integer bridgeId);

    //通过桥ID查看预警信息
    List<EarlyWarning> getEarlyWarningByBridgeId(Integer bridgeId);

    //通过ID去删除预警
    int deleteEarlyWarningById(Integer earlywarningid);

    //添加日报
    DailySensorData addDailySensorData(DailySensorData dailySensorData);

    //获取日报
    List<DailySensorData> getDailySensorData(Integer bridge, String startime, String endtime);

    //按照日期获取日报
    List<DailySensorData> getSumDailySensorData(Integer bridge, String startime, String endtime);

    //根据多个ID来获取日报
    List<WarningData> getMultiDailySenosorData(List<Integer> dataID);

    //增加异常数据
    WarningData addWarningData(WarningData warningData);

    //通过传感器参数获取异常数据
    EarlyWarning getEarlyWarningByParaID(String paraID);

    //添加预警
    EarlyWarning addEarlyWarning(EarlyWarning earlyWarning);
}
